<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
		<title></title>
		<link type="text/css" rel="stylesheet" href="{TPL_PATH}css/base.css" />
		<style type="text/css">
			.modify-table{width:100%;}
			.modify-table td{text-align:left; padding:8px 0;}
			.modify-table .mt-td-l{width:80px; font-weight:bold; color:#444;text-align:right;}
			#bbs-submit{background: none repeat scroll 0 0 #E5EDF2;border-color: #C2D5E3 #336699 #336699 #C2D5E3;border-style: solid;border-width: 1px;color: #336699;cursor: pointer;font-weight: 700;vertical-align: middle;letter-spacing:4px;padding:0 16px; line-height:28px; height:28px; font-size:14px;}
		</style>
		<script type="text/javascript" src="{PUBLIC_PATH}js/jquery.js"></script>
		<script type="text/javascript">
		<!--{eval $host = getScriptDomain();}-->
		<!--{if $host}-->
		document.domain = "$host";
		<!--{/if}-->
		</script>
	</head>
	<body>
		<!--{if $_FANWE['request']['isok']}-->
		<div id="msgbox" style="border:solid 1px #ccc; background:#eee; color:#f00; line-height:1.5em; padding:10px;">
			更新成功！
		</div>
		<!--{/if}-->
		<form action="{u handler/adv_update}" method="post" enctype="multipart/form-data">
		<table class="modify-table" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td class="mt-td-l">广告名称：</td>
				<td class="mt-td-r">
					<input type="text" name="adv_name" value="$adv[name]" class="text" size="40"/>
				</td>
			</tr>
			<tr>
				<td class="mt-td-l">推广名称：</td>
				<td class="mt-td-r">
					$auction['name']
				</td>
			</tr>
			<tr>
				<td class="mt-td-l">广告类型：</td>
				<td class="mt-td-r">
					<!--{eval $adv_current_type = $adv['type'];}-->
					<select name="ad_type" class="bLeft" id="ad_type">
						<!--{loop $adv_types $adv_key $adv_name}-->
						<option value="$adv_key"{if $adv_key == $adv_current_type} selected{/if}>$adv_name</option>
						<!--{/loop}-->
					</select>
				</td>
			</tr>
			<tr class="ad_type ad_type_1{if $adv_current_type == 3} hidden{/if}">
				<td class="mt-td-l">广告链接：</td>
				<td class="mt-td-r">
					<input type="text" name="ad_url" size="40" id="ad_url" value="$adv[url]"/><br/>
				</td>
			</tr>
			<tr class="ad_type ad_type_1 ad_type_2{if $adv_current_type == 3} hidden{/if}">
				<td class="mt-td-l">广告文件：</td>
				<td class="mt-td-r">
					<input type="file" name="ad_file" id="ad_file" class="text" size="40"/>
					<!--{if !empty($adv[code])}-->
					&nbsp;<a href="$adv[code]" target="_balnk">查看</a>
					<!--{/if}-->
					<br/>
					<p style="padding:10px 0 0 0;">
						<span style="color:#f00;" class="ad_type ad_type_1{if $adv_current_type == 2} hidden{/if}">只能上传.jpg,.png,.bmp的图片，图片大小不能超过2M</span>
						<span style="color:#f00;" class="ad_type ad_type_2{if $adv_current_type == 1} hidden{/if}">只能上传.swf的文件，文件大小不能超过2M</span>
					</p>
				</td>
			</tr>
			<tr class="ad_type ad_type_3{if $adv_current_type != 3} hidden{/if}">
				<td class="mt-td-l">广告代码：</td>
				<td class="mt-td-r">
					<textarea name="ad_code" style="width:80%; height:80px;">$adv[code]</textarea>
				</td>
			</tr>
			<tr>
				<td class="mt-td-l">&nbsp;</td>
				<td class="mt-td-r">
					<input type="hidden" name="aid" value="$aid" />
					<input type="hidden" name="id" value="$id" />
					<input type="submit" id="bbs-submit" value="提 交" />
				</td>
			</tr>
		</table>
		</form>
	</body>
	<script type="text/javascript">
		jQuery(function($){
			$("#ad_type").change(function(){
				$(".ad_type").hide();
				$(".ad_type_" + this.value).show();
			});
			
			$("#msgbox").slideUp(2000);
		});
	</script>
</html>